#!/bin/sh
#该脚本用于简单的测试一下主系统的编译环境
#方便后面的制作过程
#该脚本放在用于制作系统的账户的家目录中，运行即可
if [ -f ${BUILDDIR}/test.c ];then
	rm ${BUILDDIR}/test.c
fi
if [ -f ${BUILDDIR}/test.out ];then
        rm ${BUILDDIR}/test.out
fi
#将测试文件写入编译目录
cat > ${BUILDDIR}/test.c << "EOF"
#include <stdio.h>
main()
{
	printf("Everything is OK!\n");
	return 0;	
}
EOF
#编译测试程序
gcc -o ${BUILDDIR}/test.out ${BUILDDIR}/test.c
${BUILDDIR}/test.out
rm ${BUILDDIR}/test.c
rm ${BUILDDIR}/test.out
